<template>
  <!--基本信息  -->
  <div class="wrapper">
    <FormPanel
      ref="formPanel"
      :list="initForm"
      :cols="2"
      :formType="value.type"
      :labelWidth="110"
      @formChange="formChangeHandle"
    />
  </div>
</template>

<script>
import { authority } from '@/utils/authMixin';
import { dictionary } from '@/utils/dictMixin';
export default {
  mixins: [authority, dictionary],
  props: {
    value: {
      type: Object,
      required: true
    }
  },
  data() {
    return {
      initForm: this.initFormFun(),
      formValue: {}
    };
  },
  mounted() {
    console.log(this.value); //获取到行id 、类型（新增、详情）
    //请求接口进行赋值，自己写吧
  },
  methods: {
    //搜索数据
    initFormFun() {
      return [
        {
          type: 'INPUT',
          label: '活动编号:',
          fieldName: 'field1',
          disabled: false
        },
        {
          type: 'INPUT',
          label: '活动状态：',
          fieldName: 'field1',
          disabled: false
        },
        {
          type: 'INPUT',
          label: '活动范围：',
          fieldName: 'field1',
          disabled: false
        },
        {
          type: 'INPUT',
          label: '活动大类：',
          fieldName: 'field1',
          disabled: false
        },
        {
          type: 'INPUT',
          label: '活动小类：',
          fieldName: 'field1',
          disabled: false
        },
        {
          type: 'INPUT',
          label: '活动车型：',
          fieldName: 'field1',
          disabled: false
        },
        {
          type: 'INPUT',
          label: '申请金额：',
          fieldName: 'field1',
          disabled: false
        },
        {
          type: 'INPUT',
          label: '活动金额：',
          fieldName: 'field1',
          disabled: false
        },
        {
          type: 'INPUT',
          label: '活动类型：',
          fieldName: 'field1',
          disabled: false
        },
        {
          type: 'INPUT',
          label: '目标订单数量：',
          fieldName: 'field1',
          disabled: false
        },
        {
          type: 'INPUT',
          label: '目标集客数量：',
          fieldName: 'field1',
          disabled: false
        },
        {
          type: 'INPUT',
          label: '目标邀约数量：',
          fieldName: 'field1',
          disabled: false
        },
        {
          type: 'INPUT',
          label: '活动月份：',
          fieldName: 'field1',
          disabled: false
        },
        {
          type: 'INPUT',
          label: '开始日期：',
          fieldName: 'field1',
          disabled: false
        },
        {
          type: 'INPUT',
          label: '结束日期：',
          fieldName: 'field1',
          disabled: false
        },
        {
          type: 'INPUT',
          label: '方案编号：',
          fieldName: 'field1',
          disabled: false
        },
        {
          type: 'INPUT',
          label: '方案名称：',
          fieldName: 'field1',
          disabled: false
        },
        {
          type: 'INPUT',
          label: '活动名称：',
          fieldName: 'field1',
          disabled: false
        },
        {
          type: 'INPUT',
          label: '活动地点：',
          fieldName: 'field1',
          disabled: false
        },
        {
          type: 'INPUT',
          label: '活动描述：',
          fieldName: 'field1',
          disabled: false
        },
        {
          type: 'INPUT',
          label: '批准金额：',
          fieldName: 'field1',
          disabled: false
        }
      ];
    },
    formChangeHandle(val) {
      this.formValue = val;
    }
  }
};
</script>






